package com.zp.demo.repush.enums;


import java.util.EnumSet;

/**
 * @author:是否枚举
 * @date: 2018/5/7
 */
public enum RePushServiceBeanEnum {
    /**
     * 还款计划调用Feigin的时候异常
     */
    REPAY_PLAN_SERVICE4_MY_INVOKE("repayPlanService4MyInvoke","还款计划调用Feigin的时候异常"),
    /**
     * 还款计划推送信贷接口异常
     */
    REPAY_PLAN_SERVICE4_XD("repayPlanService4Xd","还款计划推送信贷接口异常");

    private String beanId;
    private String desc;

    RePushServiceBeanEnum(final String beanId, final String desc) {
        this.beanId = beanId;
        this.desc = desc;
    }
    public static RePushServiceBeanEnum getRePushServiceBeanEnum(String beanId){
        EnumSet<RePushServiceBeanEnum> weekSet = EnumSet.allOf(RePushServiceBeanEnum.class);
        for (RePushServiceBeanEnum enumV : weekSet) {
            if(enumV.getBeanId().equals(beanId)){
                return enumV;
            }
        }
        return null;
    }

    public String getBeanId() {
        return this.beanId;
    }

    public String getDesc(){
        return this.desc;
    }
}
